<?php

    require('init.php');
    
    if(Tools::getValue('login') && Tools::getValue('mdp')) {
        $client = Client::connect(Tools::getValue('login'), Tools::getValue('mdp'));

        if($client instanceof Client) {
            $_SESSION['client'] = $client;
            Tools::redirect('index.php');
        }

        Tools::redirect('index.php?mauvais_couple=1');
    }
?>
